#include<iostream>
using namespace std;
int main()
{
	int m, n;
	while (cin >> m >> n)
	{
		if (m > n) {
			int temp = m;
			m = n;
			n = temp;
		}
		int count = 0;
		for (int i = m; i <= n; i++)
		{
			int a = i / 100;
			int b = i / 10 % 10;
			int c = i % 10;
			if (a * a * a + b * b * b + c * c * c == i) {
				if (count == 0) {
					cout << i;
				}
				else {
					cout << " "<<i;
				}
				count++;
			}
		}
		if (count == 0) {
			cout << "no";
		}
		cout << endl;
	}
	return 0;
}